# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=libxshmfence
pkgver=1.3.2
pkgrel=6
pkgdesc="X11 shared memory fences"
url="https://www.x.org/"
arch="all"
license="MIT"
depends_dev="linux-headers"
makedepends="$depends_dev util-macros xorgproto"
subpackages="$pkgname-dev"
source="https://www.x.org/releases/individual/lib/libxshmfence-$pkgver.tar.xz"

build() {
	CFLAGS="$CFLAGS -flto=auto" \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--disable-static \
		--enable-futex
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
e20a6827e370726cf50489a69f4a52b897f1c44e3eba8c72a4e626b08724e877d090770b8016765736d887d5d5eaba1fda9c29066e62d259b4d1e2064bc1626c  libxshmfence-1.3.2.tar.xz
"
